package com.boatAnchorAssistant.pojo.entity;

import com.boatAnchorAssistant.pojo.check.Check;
import com.boatAnchorAssistant.pojo.enums.device.DeviceTypeEnum;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.TableComment;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import nirvana.core.domains.ann.AccEntity;
import nirvana.core.domains.entity.DomainBaseEntity;
import nirvana.core.domains.enums.EntityType;

import javax.persistence.Table;

/**
 * @author anni.zhu
 * @author anni.zhu@king-v.com
 * Created in 2024/11/11 10:43
 * 设备
 */
@Data
@Table
@AccEntity(value = "设备",type = EntityType.SERVICE_ENTITY)
@TableComment("设备")
public class Device extends DomainBaseEntity<Device> {

    /**
     * 设备编号
     */
    @Column(type = MySqlTypeConstant.VARCHAR,
            comment = "设备编号")
    @Check
    private String code;

    /**
     * ip
     */
    @Column(type = MySqlTypeConstant.VARCHAR,
            comment = "ip")
    private String ip;

    /**
     * rtsp
     */
    @Column(type = MySqlTypeConstant.VARCHAR,
            comment = "rtsp")
    private String rtsp;

    /**
     * 账号
     */
    @Column(type = MySqlTypeConstant.VARCHAR,
            comment = "账号")
    private String account;

    /**
     * 密码
     */
    @Column(type = MySqlTypeConstant.VARCHAR,
            comment = "密码")
    private String password;

    /**
     * 品牌
     */
    @Column(type = MySqlTypeConstant.BIGINT,
            comment = "品牌")
    private Long brandId;

    /**
     * 区域
     */
    @Column(type = MySqlTypeConstant.BIGINT,
            comment = "区域")
    private Long areaId;

    /**
     * 来源：0-手动创建 1-系统推送
     */
    @Column(type = MySqlTypeConstant.INT,
            comment = "来源：0-手动创建 1-系统推送")
    private DeviceTypeEnum source;
}
